<template>
	<view>
		<view class="list" v-for="item in storeList" @click="postStore(item.id,item.name)">
			<image class="list_img"></image>
			<view class="list_info">
				<view class="">
					{{item.name}}
				</view>
				<view class="address">
					营业时间：08：30-09：30
				</view>
				<view class="address">
					门店地址：山东省烟台市福山区东山国际
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				storeList: [{
						id: 1,
						name: '洁臣洗护（龙岗店）'
					},
					{
						id: 2,
						name: '洁臣洗护（深圳店）'
					},
				]
			};
		},
		methods:{
			postStore(id, name) {
				uni.navigateBack({
					delta: 1, // 返回上一页
					success(res) {
						// 向上一页传递参数
						uni.$emit('store', {
							store_id: id,
							store_name: name
						});
					}
				});
			}
		}

	}
</script>

<style lang="scss">
	.list {
		width: calc(90% - 40rpx);
		margin-left: 5%;
		padding: 20rpx;
		background-color: #fff;
		border-radius: 20rpx;
		margin-top: 20rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}

	.list_img {
		width: 150rpx;
		height: 150rpx;
		background-color: red;
	}

	.list_info {
		width: calc(90% - 150rpx);
		margin-left: 5%;

		.address {
			font-size: 26rpx;
			color: #ccc;
		}
	}
</style>